<!DOCTYPE html>
<html lang="en">
<head>
	<{include file="user/header.html"}>
	<title>视频课订单-学员中心-德安信会计在线教育平台</title>
</head>
<body>
	<div class="wrap">
		<!--star left-->
		<div class="column">
			<{include file="user/left_menu.html"}>
		</div>
		<div id="ContMianBox">
			<!--star子栏目-->
			<div class="sub-colum">
				<div class="tit">交易管理</div>
				<ul>
					<li class="curr"><a href="/user/orders">视频课订单</a></li>
					<li><a href="/user/orders_zhibo">直播课订单</a></li>
					<li><a href="/user/orders_banke" >面授课订单</a></li>
					<li><a href="/user/orders_tiku">题库订单</a></li>
					<li><a href="/user/orders_shixun">实训订单</a></li>
				</ul>
			</div>
			<!--end子栏目-->
			<!--end left-->
			<div class="container narrow">
				<!--star conter-->
				<div class="cetContent">
					<div class="tit p-lr20">
						<span>视频课订单</span>
					</div>
					<!--star内容区域-->
					<div class="mainScroll">
						<div class="mainContainer line-all">
							<!--star tabMainCont-->
							<div class="tabMainCont">
								<fieldset class="layui-elem-field">
									<legend>筛选</legend>
									<div class="layui-field-box">
										<form class="layui-form layui-form-pane1" method="post" action="/user/orders">
											<div class="layui-form-item">
												<div class="layui-inline">
													<label class="layui-form-label">订单号</label>
													<div class="layui-input-inline" style="width: 200px;">
														<input type="text" name="order_num" value="<{if !empty($data['order_num'])}><{$data['order_num']}><{/if}>" placeholder="订单号" autocomplete="off" class="layui-input">
													</div>
												</div>


												<label class="layui-form-label">下单时间：</label>
												<div class="layui-input-inline">
													<input class="layui-input" name="begin_time" value="<{if !empty($data['begin_time'])}><{$data['begin_time']}><{/if}>" placeholder="开始日" id="LAY_demorange_s" >
												</div>
												<div class="layui-form-mid">-</div>
												<div class="layui-input-inline">
													<input class="layui-input" name="end_time" value="<{if !empty($data['end_time'])}><{$data['end_time']}><{/if}>"  placeholder="截止日" id="LAY_demorange_e">
												</div>
												<div class="layui-inline">
													<button type="submit" class="layui-btn">搜索</button>
												</div>
											</div>
										</form>
									</div>
								</fieldset>
							</div>
							<!--商品列表 star-->
							<div class="goods_list p-t10">
								<div class="mtc_tab">
									<!--star mt-->
									<div class="mt">
										<span class="l fs16">状态：</span>
										<a href="/user/orders/index/-1/<{$data['order_num']}>/<{$data['begin_time']}>/<{$data['end_time']}>" class="<{if $data['status'] == -1}>curr<{/if}>">全部</a>
										<a href="/user/orders/index/0/<{$data['order_num']}>/<{$data['begin_time']}>/<{$data['end_time']}>" class="<{if $data['status'] == 0}>curr<{/if}>">未付款</a>
										<a href="/user/orders/index/1/<{$data['order_num']}>/<{$data['begin_time']}>/<{$data['end_time']}>" class="<{if $data['status'] == 1}>curr<{/if}>">已付款</a>
										<a href="/user/orders/index/2/<{$data['order_num']}>/<{$data['begin_time']}>/<{$data['end_time']}>" class="<{if $data['status'] == 2}>curr<{/if}>">交易成功</a>
									</div>
									<!--end mt-->
									<!--star mc-->
									<div class="mc">
										<div class="u_table_list m-t20">
											<!--star 商品-->
											<div class="table002">
												<table>
													<tbody>
														<tr>
															<th>课程</th>
															<th>订单号</th>
															<th>单价</th>
															<th>数量</th>
															<th>订单总价</th>
															<th>下单时间</th>
															<th>状态</th>
														</tr>
													</tbody>
													<tbody>
													<{foreach from=$order item=item}>
														 <{foreach from=$item['items'] item=oitem}>
														<tr>
															<td class="not_lb tal">
																<div class="product_name">
																	<div class="t_img"><a class="fs20" target="_blank" href="/video/detail/<{$oitem.course_id}>"><img src="<{$oitem.course_img}>" /></a></div>
																	<div class="t_info">
																		<a class="fs20" target="_blank" href="/video/detail/<{$oitem.course_id}>"><{$oitem.course_name}></a>
																		<div>有效期：<{$oitem.effective_time}>天</div>
																	</div>
																</div>
															</td>
															<td class="not_lb tal"><{$item.order_num}></td>
															<td class="not_lb tal"><span class="c-ff6d5e">¥<{$oitem.course_price}>元</span></td>
															<td class="not_lb tal"><{$oitem.quantity}></td>
															<td class="not_lb tal">¥<{$item.total_order_amount}></td>
															<td class="not_lb tal"><{$item['order_time']|date_format:'%Y-%m-%d %H:%M:%S'}></td>
															<td class="not_lb tal">
																<{if $item['order_status']==0}>
																	未付款<br/>
																	<a class="c-3b9eeb" target="_blank" href="/order/pay/<{$item['order_id']}>">去付款</a>
																	<br><a class="c-3b9eeb" href="/user/orders/del/<{$item['order_id']}>">删除订单</a>
																	<{elseif $item[ 'order_status']==1}>
																		已付款
																	 <{elseif $item[ 'order_status']==2}>
																		交易成功
                                								<{/if}>
																<{if $item['order_status'] !=0 }>
																	<{if $item['comment_status'] == 0}>
																	<a href="javascript:;" oid="<{$item['order_id']}>" class="comment">
																		<span class="c-3b9eeb">课程评价</span>
																	</a>
																	<{elseif $item['comment_status'] == 1}>
																	<a href="javascript:;" oid="<{$item['order_id']}>" class="comment">
																		<span class="c-3b9eeb">查看评价</span>
																	</a>
																	<{/if}>
																<{/if}>
															</td>
														</tr>
														<{/foreach}>
														<{/foreach}>
													</tbody>
												</table>
											</div>
											<!--end 商品-->
										</div>
										<div class="pages p-tb20" style="text-align:right;">
											<{$pagination}>
										</div>
									</div>
									<!--end mc-->
								</div>
							</div>
							<!--商品列表 end -->
						</div>
						<!--end tabMainCont-->
					</div>
				</div>
			</div>
			<!--end内容区域-->
			<script>
			$(function(){
				$.fn.Dashentab(".cetContent .tit","span",".tabMainCont",".tabItem","curr","click",0);
			});
			</script>
		</div>
		<script>
			$(function(){
				$(".sub-colum").find('li').on('click',function(){//子栏目点击选中状态；
					$(this).addClass('curr').siblings().removeClass('curr');
				})
			});
		</script>
		<script>
		$(function(){
			$(".comment").click(function(){
				var order_id = $(this).attr("oid");
				// alert(order_id);
				iframe_index = layer.open({
				 type: 2,
				 area: ['620px', '450px'],
				 fixed: false, //不固定
				 maxmin: false,
				 shadeClose: true,
				 title: false,
				 content: ['/user/orders/comment/'+order_id, 'no']
			 });
			})
		})
		</script>
		<script>
			layui.use('laydate', function(){
			  var laydate = layui.laydate;

			  var start = {
			    min: '2016-11-31 23:59:59'
			    ,max: laydate.now(+1)
			    ,istoday: false
			    ,choose: function(datas){
			      end.min = datas; //开始日选好后，重置结束日的最小日期
			      end.start = datas //将结束日的初始值设定为开始日
			    }
			  };

			  var end = {
			    min: '2016-11-31 23:59:59'
			    ,max: laydate.now(+1)
			    ,istoday: false
			    ,choose: function(datas){
			      start.max = datas; //结束日选好后，重置开始日的最大日期
			    }
			  };

			  document.getElementById('LAY_demorange_s').onclick = function(){
			    start.elem = this;
			    laydate(start);
			  }
			  document.getElementById('LAY_demorange_e').onclick = function(){
			    end.elem = this
			    laydate(end);
			  }

			});
		</script>
	</div>
</body>
</html>
